//
// Created by gogoqiu on 2021/8/26.
//

#ifndef WXTEST_SWITCH_CONTROL_H
#define WXTEST_SWITCH_CONTROL_H

#include "wx/wx.h"

/*
 *
 */
class SwitchControl :wxControl{
private:
    bool value;
DECLARE_DYNAMIC_CLASS(SwitchControl)

DECLARE_EVENT_TABLE()

public:
    SwitchControl() {Init();}
    void Init() {}

    SwitchControl(wxWindow *parent,
        wxWindowID id,
        const wxPoint& pos = wxDefaultPosition,
        const wxSize& size = wxDefaultSize,
        long style = 0, const wxValidator& validator = wxDefaultValidator)
    {
        Init();
        Create(parent, id, pos, size, style, validator);
    }

    bool Create(wxWindow *parent,
                wxWindowID id,
                const wxPoint& pos = wxDefaultPosition,
                const wxSize& size = wxDefaultSize,
                long style = 0,
                const wxValidator& validator = wxDefaultValidator);

    ~SwitchControl() override;

    void OnTimer( wxTimerEvent& event );
protected:
    void OnPaint(wxPaintEvent& event);
};


#endif //WXTEST_SWITCHCONTROL_H
